package org.drools.controller;

import org.kie.api.runtime.KieSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DroolsService {

    @Autowired
    private KieSession kieSession;

    public <T> void fireAllRules(T t) {
        kieSession.insert(t);
        kieSession.fireAllRules();
    }
}
